
package todolist.personalization;

import todolist.entity.TaskStatusType;

/**
 * Controls application behaviour related to Task Status input and display.
 * Singleton class.
 * Currently allows getting only, may allow reading/setting/writing in the future.
 * @see todolist.entity.TaskStatus
 * @author Ivan
 */
public class TaskStatusCustomizer {

	// handle singleton instance

	private static TaskStatusCustomizer _objTSC;

	public static TaskStatusCustomizer getInstance() {
		if (_objTSC == null)
			_objTSC = new TaskStatusCustomizer();
		return _objTSC;
	}
	
	// display Task Status
	
	private static final String STATUS_DISPLAY_COMPLETED = "Completed";
	private static final String STATUS_DISPLAY_PENDING = "Pending";
	private static final String STATUS_DISPLAY_IN_PROGRESS = "In Progress";
	private static final String STATUS_DISPLAY_OVERDUE = "Overdue";

	/**
	 * Default Status when Task is created.
	 */
	public TaskStatusType getDefaultTaskStatus() {
		return TaskStatusType.PENDING;
	}

	// display Task Status methods
	
	/**
	 * Descriptor of Task that is marked Completed.
	 */
	public String getDisplayTaskStatusCompleted() {
		return STATUS_DISPLAY_COMPLETED;
	}

	/**
	 * Descriptor of Task that has not reached Start Date.
	 */
	public String getDisplayTaskStatusPending() {
		return STATUS_DISPLAY_PENDING;
	}

	/**
	 * Descriptor of Task that is between Start and End Date.
	 */
	public String getDisplayTaskStatusInProgress() {
		return STATUS_DISPLAY_IN_PROGRESS;
	}

	/**
	 * Descriptor of Task that is after End Date but not marked completed.
	 */
	public String getDisplayTaskStatusOverdue() {
		return STATUS_DISPLAY_OVERDUE;
	}

}
